<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>GCC 9 Release Series &mdash; Changes, New Features, and Fixes</title>
<link rel="stylesheet" type="text/css" href="https://gcc.gnu.org/gcc.css" />
</head>

<!-- GCC maintainers, please do not hesitate to contribute/update
     entries concerning those part of GCC you maintain!
-->

<body>
<h1>GCC 9 Release Series<br/>Changes, New Features, and Fixes</h1>

<p>
This page is a "brief" summary of some of the huge number of improvements
in GCC 9.
You may also want to check out our
<a href="porting_to.html">Porting to GCC 9</a> page and the
<a href="../onlinedocs/index.html#current">full GCC documentation</a>.
</p>

<!-- .................................................................. -->
<h2>Caveats</h2>
<ul>
  <li>
    On Arm targets (<code>arm*-*-*</code>),
    <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469">a bug</a>
    in the implementation of the procedure call standard (AAPCS)
    in the GCC 6, 7 and 8 releases has been fixed: a structure
    containing a bit-field based on a 64-bit integral type and where
    no other element in a structure required 64-bit alignment could be
    passed incorrectly to functions.  This is an ABI change.  If the
    option <code>-Wpsabi</code> is enabled (on by default) the
    compiler will emit a diagnostic note for code that might be
    affected.
  </li>
  <li><p>Support for a number of older systems and recently
      unmaintained or untested target ports of GCC has been declared
      obsolete in GCC 9.  Unless there is activity to revive them, the
      next release of GCC will have their sources permanently
      <strong>removed</strong>.</p>

    <p>The following ports for individual systems on
      particular architectures have been obsoleted:</p>

    <ul>
      <li>Solaris 10 (<code>*-*-solaris2.10</code>).  Details can be found
      in the <a href="https://gcc.gnu.org/ml/gcc/2018-10/msg00139.html">
      announcement</a>.</li>
    </ul>
    <ul>
      <li>Cell Broadband Engine SPU (<code>spu*-*-*</code>).  Details can be found
      in the <a href="https://gcc.gnu.org/ml/gcc/2019-04/msg00023.html">
      announcement</a>.</li>
    </ul>
  </li>
  <li>
    A change to the C++ <code>std::rotate</code> algorithm in GCC 9.1.0 can
    cause ABI incompatibilities with object files compiled with other versions
    of GCC. If the <code>std::rotate</code> algorithm is called with
    an empty range then it might cause a divide-by-zero error
    (as a <code>SIGFPE</code> signal) and crash. The change has been reverted
    for GCC 9.2.0 and future releases. For more details see
    <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90920">Bug 90920</a>.
    The problem can be avoided by recompiling any objects that might call
    <code>std::rotate</code> with an empty range, so that the GCC 9.1.0
    definition of <code>std::rotate</code> is not used.
  </li>
  <li>
    The automatic template instantiation at link time
    (<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-frepo"><code>-frepo</code></a>)
    has been deprecated and will be removed in a future release.
  </li>
  <li>
    The <code>--with-default-libstdcxx-abi=gcc4-compatible</code> configure
    option is broken in the 9.1 and 9.2 releases, producing a shared library
    with missing symbols
    (see <a href="https://gcc.gnu.org/PR90361">Bug 90361</a>).
    As a workaround, configure without that option and build GCC as normal,
    then edit the installed <code>&lt;bits/c++config.h&gt;</code> headers
    to define the <code>_GLIBCXX_USE_CXX11_ABI</code> macro to <code>0</code>.
  </li>

</ul>


<!-- .................................................................. -->
<h2 id="general">General Improvements</h2>
<p>The following GCC command line options have been introduced or improved.</p>
<ul>
  <li>
    All command line options that take a <i>byte-size</i> argument accept
    64-bit integers as well as standard SI and IEC suffixes such as
    <code>kb</code> and <code>KiB</code>, <code>MB</code> and
    <code>MiB</code>, or <code>GB</code> and <code>GiB</code> denoting
    the corresponding  multiples of bytes.  See
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Invoking-GCC.html#Invoking-GCC">
      Invoking GCC</a> for more.
  </li>
  <li>
    A new option, <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-flive-patching"><code>-flive-patching=[inline-only-static|inline-clone]</code></a>, has been
    introduced to provide a safe compilation for live-patching. At the same
    time, provides multiple-level control on the enabled IPA optimizations.
    See the user guide for more details about the option.
  </li>
  <li>
      A new option, <code>--completion</code>, has been added to provide more fine
      option completion in a shell.  It is intended to be used by Bash-completion.
  </li>
  <li>
    <p>
      GCC's diagnostics now print source code with a left margin showing line
      numbers, configurable with
      <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fno-diagnostics-show-line-numbers">-fno-diagnostics-show-line-numbers</a>.
    </p>
    <p>
      GCC's diagnostics can also now label regions of the source code to
      show pertinent information, such as the types within an expression.
    </p>
<pre class="blackbg">
$ g++ t.cc
<span class="bold">t.cc:</span> In function &#x27;<span class="bold">int test(const shape&amp;, const shape&amp;)</span>&#x27;:
<span class="bold">t.cc:15:4:</span> <span class="boldred">error: </span>no match for &#x27;<span class="bold">operator+</span>&#x27; (operand types are &#x27;<span class="bold">boxed_value&lt;double&gt;</span>&#x27; and &#x27;<span class="bold">boxed_value&lt;double&gt;</span>&#x27;)
   14 |   return (<span class="green">width(s1) * height(s1)</span>
      |           <span class="green">~~~~~~~~~~~~~~~~~~~~~~</span>
      |                     <span class="green">|</span>
      |                     <span class="green">boxed_value&lt;[...]&gt;</span>
   15 |    <span class="boldred">+</span> <span class="blue">width(s2) * height(s2)</span>);
      |    <span class="boldred">^</span> <span class="blue">~~~~~~~~~~~~~~~~~~~~~~</span>
      |                <span class="blue">|</span>
      |                <span class="blue">boxed_value&lt;[...]&gt;</span>
</pre>

    <p>
      These labels can be disabled via
      <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fno-diagnostics-show-labels">-fno-diagnostics-show-labels</a>.
    </p>
  </li>
  <li>
    A new option <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format">-fdiagnostics-format=json</a>
    has been introduced for emitting diagnostics in a machine-readable
    format.
  </li>
  <li>
      The alignment-related options <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-functions"><code>-falign-functions</code></a>,
      <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-labels"><code>-falign-labels</code></a>,
      <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-loops"><code>-falign-loops</code></a>,
      and <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-falign-jumps"><code>-falign-jumps</code></a> received support for a secondary
      alignment (e.g. <code>-falign-loops=n:m:n2:m2</code>).
  </li>
  <li>
      New pair of profiling options (<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fprofile-filter-files"><code>-fprofile-filter-files</code></a>
      and <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fprofile-exclude-files"><code>-fprofile-exclude-files</code></a>) has been added.
      The options help to filter which source files are instrumented.
  </li>
  <li>
    AddressSanitizer generates more compact redzones for automatic variables.
    That helps to reduce memory footprint of a sanitized binary.
  </li>
  <li>
    <p>
      Numerous improvements have been made to the output of
      <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Developer-Options.html#index-fopt-info">-fopt-info</a>.</p>
    <p>
      Messages are now prefixed with <code>optimized</code>,
      <code>missed</code>, or <code>note</code>, rather than the old
      behavior of all being prefixed with <code>note</code>.
    </p>
    <p>
      The output from <code>-fopt-info</code> can now contain information
      on inlining decisions:
    </p>
<pre class="blackbg">
$ g++ -c inline.cc -O2 -fopt-info-inline-all
inline.cc:24:11: note: Considering inline candidate void foreach(T, T, void (*)(E)) [with T = char**; E = char*]/2.
inline.cc:24:11: optimized:  Inlining void foreach(T, T, void (*)(E)) [with T = char**; E = char*]/2 into int main(int, char**)/1.
inline.cc:19:12: missed:   not inlinable: void inline_me(char*)/0 -&gt; int std::puts(const char*)/3, function body not available
inline.cc:13:8: optimized:  Inlined void inline_me(char*)/4 into int main(int, char**)/1 which now has time 127.363637 and size 11, net change of +0.
Unit growth for small function inlining: 16-&gt;16 (0%)

Inlined 2 calls, eliminated 1 functions

</pre>

    <p>
      The output from the vectorizer has been rationalized so that failed
      attempts to vectorize a loop are displayed in the form
    </p>
    <pre>
    [LOOP-LOCATION]: couldn't vectorize this loop
    [PROBLEM-LOCATION]: because of [REASON]
    </pre>
    <p>
      rather than an exhaustive log of all decisions made by the vectorizer.
      For example:
    </p>
<pre class="blackbg">
$ gcc -c v.c -O3 -fopt-info-all-vec
v.c:7:3: missed: couldn&#x27;t vectorize loop
v.c:10:7: missed: statement clobbers memory: __asm__ __volatile__(&quot;&quot; :  :  : &quot;memory&quot;);
v.c:3:6: note: vectorized 0 loops in function.
v.c:10:7: missed: statement clobbers memory: __asm__ __volatile__(&quot;&quot; :  :  : &quot;memory&quot;);
</pre>

    <p>
      The old behavior can be obtained via a new <code>-internals</code>
      suboption of <code>-fopt-info</code>.
    </p>
  </li>
  <li>
    A new option,
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Developer-Options.html#index-fsave-optimization-record">-fsave-optimization-record</a>
    has been added, which writes a <code>SRCFILE.opt-record.json.gz</code>
    file describing the optimization decisions made by GCC.  This is
    similar to the output of <code>-fopt-info</code>, but with additional
    metadata such as the inlining chain, and profile information (if
    available).
  </li>
  <li>Inter-procedural propagation of stack alignment can now be controlled by
      <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fipa-stack-alignment"><code>-fipa-stack-alignment</code></a>.
  <li>Propagation of addressability, readonly and writeonly flags on
      static variables can now be controlled by
      <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fipa-reference-addressable"><code>-fipa-reference-addressable</code></a>.
</ul>
<p>The following built-in functions have been introduced.</p>
<ul>
  <li>
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect_005fwith_005fprobability"><code>__builtin_expect_with_probability</code></a> to provide branch prediction probability hints to
    the optimizer.
  </li>
  <li>
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fhas_005fattribute-1"><code>__builtin_has_attribute</code></a> determines whether a function, type, or variable has been declared with some
    attribute.
  </li>
  <li>
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fspeculation_005fsafe_005fvalue-1"><code>__builtin_speculation_safe_value</code></a> can be used to help mitigate against unsafe speculative
    execution.
  </li>
</ul>
<p>The following attributes have been introduced.</p>
<ul>
  <li>
    The <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Common-Function-Attributes.html#index-copy-function-attribute"><code>copy</code></a> function attribute has been
    added.  The attribute can also be applied to type definitions and to
    variable declarations.
  </li>
</ul>
<p>A large number of improvements to code generation have been made,
  including but not limited to the following.</p>
<ul>
  <li>
      Switch expansion has been improved by using a different strategy
      (jump table, bit test, decision tree) for a subset of switch cases.
  </li>
  <li>
      A linear function expression defined as a switch statement
      can be transformed by <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-ftree-switch-conversion"><code>-ftree-switch-conversion</code></a>.  For example:
    <blockquote><pre class="blackbg">
int
foo (int how)
{
  switch (how) {
    case 2: how = 205; break;
    case 3: how = 305; break;
    case 4: how = 405; break;
    case 5: how = 505; break;
    case 6: how = 605; break;
  }
  return how;
}
</pre></blockquote>
      can be transformed into <code>100 * how + 5</code> (for values defined
      in the switch statement).
  </li>
<li>Inter-procedural optimization improvements:
  <ul>
   <li>Inliner defaults was tuned to better suits modern C++ codebases
       especially when built with link time optimizations.
       New parameters <code>max-inline-insns-small</code>,
       <code>max-inline-insns-size</code>,
       <code>uninlined-function-insns</code>,
       <code>uninlined-function-time</code>, <code>uninlined-thunk-insns</code>,
       and <code>uninlined-thunk-time</code> were added.</li>
   <li>Hot/cold partitioning is now more precise and aggressive.</li>
   <li>Improved scalability for very large translation units (especially
       when link-time optimizing large programs).</li>
  </ul>
<li>Profile driven optimization improvements:
  <ul>
      <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fprofile-use"><code>-fprofile-use</code></a> now enables
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-fversion-loops-for-strides"><code>-fversion-loops-for-strides</code></a>,
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-floop-interchange"><code>-floop-interchange</code></a>,
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-floop-unroll-and-jam"><code>-floop-unroll-and-jam</code></a>,
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Optimize-Options.html#index-ftree-loop-distribution"><code>-ftree-loop-distribution</code></a>.</li>
    <li>Streaming of counter histograms was removed.  This reduces
	the size of profile files.  Histogram is computed on the fly
	with link-time optimization.
    Parameter <code>hot-bb-count-ws-permille</code> was reduced
    from 999 to 990 to account for more precise histograms.</li>
  </ul>
<li>Link-time optimization improvements:
  <ul>
    <li>Types are now simplified prior streaming resulting in significant
	reductions of the LTO object files, link-time memory use, and
	improvements of link-time parallelism.</li>
    <li>Default number of partitions (<code>--param lto-partitions</code>) was
	increased from 32 to 128 enabling effective use of CPUs with more than
	32 hyperthreads. <code>--param lto-max-streaming-parallelism</code>
	can now be used to control number of streaming processes.</li>
    <li>Warnings on C++ One Decl Rule violations (<code>-Wodr</code>) are
	now more informative and produce fewer redundant results.</li>
  </ul>
  Overall compile time of Firefox 66 and LibreOffice 6.2.3 on an 8-core
  machine was reduced by about 5% compared to GCC 8.3, and the size of
  LTO object files by 7%.  LTO link-time improves by 11% on an 8-core
  machine and scales significantly better for more parallel build
  environments.  The serial stage of
  the link-time optimization is 28% faster consuming 20% less memory.
  The parallel stage now scales to up to 128 partitions rather than 32 and
  reduces memory use for every worker by 30%.
  </li>
</ul>
<p>The following improvements to the <code>gcov</code> command-line utility
  have been made.</p>
<ul>
  <li>
      The gcov tool received a new option <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Invoking-Gcov.html#Invoking-Gcov"><code>--use-hotness-colors</code></a>
      (<code>-q</code>) that can provide perf-like coloring of hot functions.
  </li>
  <li>
      The gcov tool has changed its intermediate format to a new JSON format.
  </li>
</ul>

<!-- .................................................................. -->
<h2 id="languages">New Languages and Language specific improvements</h2>

<!--
<ul>
  <li>
-->
    <a href="https://www.openacc.org">OpenACC</a> support in C, C++, and
    Fortran continues to be maintained and improved.
    Most of the OpenACC 2.5 specification is implemented.
    See the
    <a href="https://gcc.gnu.org/wiki/OpenACC/Implementation%20Status#status-9">implementation
    status</a> section on the OpenACC wiki page for further information.
<!--
  </li>
</ul>
-->

<!-- <h3 id="ada">Ada</h3> -->

<!-- <h3 id="brig">BRIG (HSAIL)</h3> -->

<h3 id="c-family">C family</h3>
<ul>
  <li>Version 5.0 of the <a href="https://www.openmp.org/specifications/"
        >OpenMP specification</a> is now partially supported in the C and C++
      compilers.  For details which features of OpenMP 5.0 are and which are
      not supported in the GCC 9 release see
      <a href="https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00628.html">this mail</a>.
  </li>
  <li>New extensions:
  <ul>
    <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Vector-Extensions.html#index-_005f_005fbuiltin_005fconvertvector"><code>__builtin_convertvector</code></a> built-in for vector conversions
      has been added. </li>
  </ul></li>

  <li>New warnings:
  <ul>
      <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Waddress-of-packed-member"><code>-Waddress-of-packed-member</code></a>, enabled by default,
      warns about an unaligned pointer value from the address of a packed
      member of a struct or union.
      </li>
  </ul>

  <li>Enhancements to existing warnings:
    <ul>
      <li>
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Warray-bounds"><code>-Warray-bounds</code></a> detects more instances
	of out-of-bounds indices.
      </li>
      <li>
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wattribute-alias"><code>-Wattribute-alias</code></a> also detects attribute
	mismatches between alias declarations and their targets, in addition
	to mismatches between their types.
      </li>
      <li>
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat-overflow"><code>-Wformat-overflow</code></a> and
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat-truncation"><code>-Wformat-truncation</code></a> have been extended
	to all formatted input/output functions (where applicable) and
	enhanced to detect a subset of instances of reading past the end
	of unterminated constant character arrays in <code>%s</code>
	directives.
      </li>
      <li>
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wmissing-attributes"><code>-Wmissing-attributes</code></a> detects instances
	of missing function attributes on declarations of aliases and weak
	references.
      </li>
      <li>
	<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wstringop-truncation"><code>-Wstringop-truncation</code></a> also detects
	a subset of instances of reading past the end of unterminated
	constant character arrays,
      </li>
    </ul>
  </li>

  <li>
    If a macro is used with the wrong argument count, the C and C++ front
    ends now show the definition of that macro via a <code>note</code>.
  </li>

  <li>
    The spelling corrector now considers transposed letters, and the
    threshold for similarity has been tightened, to avoid nonsensical
    suggestions.
  </li>
</ul>

<h3 id="c">C</h3>
<ul>
  <li>There is now experimental support for <code>-std=c2x</code>, to
  select support for the upcoming C2X revision of the ISO C
  standard.  This standard is in the early stages of development and
  the only feature supported in GCC 9 is <code>_Static_assert</code>
  with a single argument (support for <code>_Static_assert</code> with two
  arguments was added in C11 and GCC 4.6).  There are also new
  options <code>-std=gnu2x</code>, for C2X with GNU extensions,
  and <code>-Wc11-c2x-compat</code>, to warn for uses of features
  added in C2X (such warnings are also enabled by use
  of <code>-Wpedantic</code> if not using <code>-std=c2x</code>
  or <code>-std=gnu2x</code>).</li>
  <li>New warnings:
  <ul>
    <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wabsolute-value"><code>-Wabsolute-value</code></a>
      warns for calls to standard functions that compute the absolute
      value of an argument when a more appropriate standard function
      is available.  For example, calling <code>abs(3.14)</code>
      triggers the warning because the appropriate function to call to
      compute the absolute value of a double argument
      is <code>fabs</code>.  The option also triggers warnings when
      the argument in a call to such a function has an unsigned type.
      This warning can be suppressed with an explicit type cast and it
      is also enabled by <code>-Wextra</code>.
    </li>
  </ul></li>
</ul>

<h3 id="cxx">C++</h3>
<ul>
  <li>New warnings:
  <ul>
    <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wdeprecated-copy"><code>-Wdeprecated-copy</code></a>, implied by <code>-Wextra</code>, warns
      about the C++11 deprecation of implicitly declared copy constructor and
      assignment operator if one of them is user-provided.
      <code>-Wdeprecated-copy-dtor</code> also warns if the destructor is
      user-provided, as specified in C++11.
    </li>
    <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Winit-list-lifetime"><code>-Winit-list-lifetime</code></a>, on by default, warns about uses
      of <code>std::initializer_list</code> that are likely to result in a
      dangling pointer, such as returning or assigning from a temporary
      list. </li>
    <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wredundant-move"><code>-Wredundant-move</code></a>, implied by <code>-Wextra</code>, warns about redundant calls to
    <code>std::move</code>.</li>
    <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wpessimizing-move"><code>-Wpessimizing-move</code></a>, implied by <code>-Wall</code>, warns when a call to
    <code>std::move</code> prevents copy elision.</li>
    <li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wclass-conversion"><code>-Wclass-conversion</code></a>, on by default, warns when a conversion function will never be
    called due to the type it converts to.</li>
  </ul></li>

  <li>
    The C++ front end has experimental support for some of the upcoming C++2a
    draft features with the <code>-std=c++2a</code>
    or <code>-std=gnu++2a</code> flags, including range-based for statements
    with initializer, default constructible and assignable stateless lambdas,
    lambdas in unevaluated contexts, language support for empty data members,
    allowing pack expansion in lambda init-capture, likely and unlikely
    attributes, class types in non-type template parameters, allowing virtual
    function calls in constant expressions, explicit(bool),
    <code>std::is_constant_evaluated</code>, nested inline namespaces, etc.
    For a full list of new features,
    see <a href="../projects/cxx-status.html#cxx2a">the C++
    status page</a>.
  </li>

  <li>
    The C++ front end now preserves source locations for literals,
    <code>id-expression</code>, and <code>mem-initializer</code> for longer.
    For example it is now able to pin-point the pertinent locations for
    bad initializations such as these
<pre class="blackbg">
$ g++ -c bad-inits.cc
<span class="bold">bad-inits.cc:10:14:</span> <span class="boldred">error: </span>cannot convert &#x27;<span class="bold">json</span>&#x27; to &#x27;<span class="bold">int</span>&#x27; in initialization
   10 |   { 3, <span class="boldred">json::object</span> },
      |        <span class="boldred">~~~~~~^~~~~~</span>
      |              <span class="boldred">|</span>
      |              <span class="boldred">json</span>
<span class="bold">bad-inits.cc:14:31:</span> <span class="boldred">error: </span>initializer-string for array of chars is too long [<span class="boldred">-fpermissive</span>]
   14 | char buffers[3][5] = { &quot;red&quot;, <span class="boldred">&quot;green&quot;</span>, &quot;blue&quot; };
      |                               <span class="boldred">^~~~~~~</span>
<span class="bold">bad-inits.cc:</span> In constructor &#x27;<span class="bold">X::X()</span>&#x27;:
<span class="bold">bad-inits.cc:17:13:</span> <span class="boldred">error: </span>invalid conversion from &#x27;<span class="bold">int</span>&#x27; to &#x27;<span class="bold">void*</span>&#x27; [<span class="boldred">-fpermissive</span>]
   17 |   X() : one(<span class="boldred">42</span>), two(42), three(42)
      |             <span class="boldred">^~</span>
      |             <span class="boldred">|</span>
      |             <span class="boldred">int</span>
</pre>

    rather than emitting the error at the final closing parenthesis or
    brace.
  </li>

  <li>
    Error-reporting of overload resolution has been special-cased to make
    the case of a single failed candidate easier to read.  For example:

<pre class="blackbg">
$ g++ param-type-mismatch.cc
<span class="bold">param-type-mismatch.cc:</span> In function &#x27;<span class="bold">int test(int, const char*, float)</span>&#x27;:
<span class="bold">param-type-mismatch.cc:8:32:</span> <span class="boldred">error: </span>cannot convert &#x27;<span class="bold">const char*</span>&#x27; to &#x27;<span class="bold">const char**</span>&#x27;
    8 |   return foo::member_1 (first, <span class="boldred">second</span>, third);
      |                                <span class="boldred">^~~~~~</span>
      |                                <span class="boldred">|</span>
      |                                <span class="boldred">const char*</span>
<span class="bold">param-type-mismatch.cc:3:46:</span> <span class="boldcyan">note: </span>  initializing argument 2 of &#x27;<span class="bold">static int foo::member_1(int, const char**, float)</span>&#x27;
    3 |   static int member_1 (int one, <span class="boldcyan">const char **two</span>, float three);
      |                                 <span class="boldcyan">~~~~~~~~~~~~~^~~</span>
</pre>


    highlights both the problematic argument, and the parameter
    that it can't be converted to.
  </li>

  <li>
    Diagnostics involving binary operators now use color to distinguish the two
    operands, and label them separately (as per the example of source
    labelling above).
  </li>

  <li>
    Diagnostics involving function calls now highlight the pertinent parameter
    of the declaration in more places.
<pre class="blackbg">
$ g++ bad-conversion.cc
<span class="bold">bad-conversion.cc:</span> In function &#x27;<span class="bold">void caller()</span>&#x27;:
<span class="bold">bad-conversion.cc:9:14:</span> <span class="boldred">error: </span>cannot convert &#x27;<span class="bold">bool</span>&#x27; to &#x27;<span class="bold">void*</span>&#x27;
    9 |   callee (0, <span class="boldred">false</span>, 2);
      |              <span class="boldred">^~~~~</span>
      |              <span class="boldred">|</span>
      |              <span class="boldred">bool</span>
<span class="bold">bad-conversion.cc:3:19:</span> <span class="boldcyan">note: </span>  initializing argument 2 of &#x27;<span class="bold">void callee(int, void*, int)</span>&#x27;
    3 | void callee (int, <span class="boldcyan">void *</span>, int)
      |                   <span class="boldcyan">^~~~~~</span>
</pre>

  </li>

  <li>
    The C++ front end's implementation of
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Warning-Options.html#index-Wformat">-Wformat</a>
    now shows precise locations within string literals, and underlines
    the pertinent arguments at bogus call sites (the C front end has been
    doing this since GCC 7).  For example:
<pre class="blackbg">
$ g++ -c bad-printf.cc -Wall
<span class="bold">bad-printf.cc:</span> In function &#x27;<span class="bold">void print_field(const char*, float, long int, long int)</span>&#x27;:
<span class="bold">bad-printf.cc:6:17:</span> <span class="boldmagenta">warning: </span>field width specifier &#x27;<span class="bold">*</span>&#x27; expects argument of type &#x27;<span class="bold">int</span>&#x27;, but argument 3 has type &#x27;<span class="bold">long int</span>&#x27; [<span class="boldmagenta">-Wformat=</span>]
    6 |   printf (&quot;%s: <span class="boldmagenta">%*ld</span> &quot;, fieldname, <span class="green">column - width</span>, value);
      |                <span class="boldmagenta">~^~~</span>               <span class="green">~~~~~~~~~~~~~~</span>
      |                 <span class="boldmagenta">|</span>                        <span class="green">|</span>
      |                 <span class="boldmagenta">int</span>                      <span class="green">long int</span>
<span class="bold">bad-printf.cc:6:19:</span> <span class="boldmagenta">warning: </span>format &#x27;<span class="bold">%ld</span>&#x27; expects argument of type &#x27;<span class="bold">long int</span>&#x27;, but argument 4 has type &#x27;<span class="bold">double</span>&#x27; [<span class="boldmagenta">-Wformat=</span>]
    6 |   printf (&quot;%s: <span class="boldmagenta">%*ld</span> &quot;, fieldname, column - width, <span class="green">value</span>);
      |                <span class="boldmagenta">~~~^</span>                               <span class="green">~~~~~</span>
      |                   <span class="boldmagenta">|</span>                               <span class="green">|</span>
      |                   <span class="boldmagenta">long int</span>                        <span class="green">double</span>
      |                <span class="green">%*f</span>
</pre>

  </li>

  <li>
    The C++ front end has gained new fix-it hints for forgetting the
    <code>return *this;</code> needed by various C++ operators:

<pre class="blackbg">
$ g++ -c operator.cc
<span class="bold">operator.cc:</span> In member function &#x27;<span class="bold">boxed_ptr&amp; boxed_ptr::operator=(const boxed_ptr&amp;)</span>&#x27;:
<span class="bold">operator.cc:7:3:</span> <span class="boldmagenta">warning: </span>no return statement in function returning non-void [<span class="boldmagenta">-Wreturn-type</span>]
    6 |     m_ptr = other.m_ptr;
  +++ |+<span class="green">    return *this;</span>
    7 |   <span class="boldmagenta">}</span>
      |   <span class="boldmagenta">^</span>
</pre>


    for when the compiler needs a <code>typename</code>:

<pre class="blackbg">
$ g++ -c template.cc
<span class="bold">template.cc:3:3:</span> <span class="boldred">error: </span>need &#x27;<span class="bold">typename</span>&#x27; before &#x27;<span class="bold">Traits::type</span>&#x27; because &#x27;<span class="bold">Traits</span>&#x27; is a dependent scope
    3 |   <span class="boldred">Traits</span>::type type;
      |   <span class="boldred">^~~~~~</span>
      |   <span class="green">typename </span>
</pre>


    when trying to use an accessor member as if it were a data member:

<pre class="blackbg">
$ g++ -c fncall.cc
<span class="bold">fncall.cc:</span> In function &#x27;<span class="bold">void hangman(const mystring&amp;)</span>&#x27;:
<span class="bold">fncall.cc:12:11:</span> <span class="boldred">error: </span>invalid use of member function &#x27;<span class="bold">int mystring::get_length() const</span>&#x27; (did you forget the &#x27;<span class="bold">()</span>&#x27; ?)
   12 |   if (<span class="boldred">str.get_length</span> &gt; 0)
      |       <span class="boldred">~~~~^~~~~~~~~~</span>
      |                     <span class="green">()</span>
</pre>


    for C++11's scoped enums:

<pre class="blackbg">
$ g++ -c enums.cc
<span class="bold">enums.cc:</span> In function &#x27;<span class="bold">void json::test(const json::value&amp;)</span>&#x27;:
<span class="bold">enums.cc:12:26:</span> <span class="boldred">error: </span>&#x27;<span class="bold">STRING</span>&#x27; was not declared in this scope; did you mean &#x27;<span class="bold">json::kind::STRING</span>&#x27;?
   12 |     if (v.get_kind () == <span class="boldred">STRING</span>)
      |                          <span class="boldred">^~~~~~</span>
      |                          <span class="green">json::kind::STRING</span>
<span class="bold">enums.cc:3:44:</span> <span class="boldcyan">note: </span>&#x27;<span class="bold">json::kind::STRING</span>&#x27; declared here
    3 |   enum class kind { OBJECT, ARRAY, NUMBER, <span class="boldcyan">STRING</span>, TRUE, FALSE, NULL_ };
      |                                            <span class="boldcyan">^~~~~~</span>
</pre>


    and a tweak to integrate the suggestions about misspelled members
    with that for accessors:

<pre class="blackbg">
$ g++ -c accessor-fixit.cc
<span class="bold">accessor-fixit.cc:</span> In function &#x27;<span class="bold">int test(t*)</span>&#x27;:
<span class="bold">accessor-fixit.cc:17:15:</span> <span class="boldred">error: </span>&#x27;<span class="bold">class t</span>&#x27; has no member named &#x27;<span class="bold">ratio</span>&#x27;; did you mean &#x27;<span class="bold">int t::m_ratio</span>&#x27;? (accessible via &#x27;<span class="bold">int t::get_ratio() const</span>&#x27;)
   17 |   return ptr-&gt;<span class="boldred">ratio</span>;
      |               <span class="boldred">^~~~~</span>
      |               <span class="green">get_ratio()</span>
</pre>


    In addition, various diagnostics in the C++ front-end have been
    streamlined by consolidating the suggestion into the initial
    error, rather than emitting a follow-up note:

<pre class="blackbg">
$ g++ typo.cc
<span class="bold">typo.cc:5:13:</span> <span class="boldred">error: </span>&#x27;<span class="bold">BUFSIZE</span>&#x27; was not declared in this scope; did you mean &#x27;<span class="bold">BUF_SIZE</span>&#x27;?
    5 | uint8_t buf[<span class="boldred">BUFSIZE</span>];
      |             <span class="boldred">^~~~~~~</span>
      |             <span class="green">BUF_SIZE</span>
</pre>


  </li>
</ul>

<h4 id="libstdcxx">Runtime Library (libstdc++)</h4>
<ul>
  <li>Improved support for C++17, including:
      <ul>
      <li> The C++17 implementation is no longer experimental. </li>
      <li>
        Parallel algorithms and <code>&lt;execution&gt;</code>
        (requires <a href="https://github.com/oneapi-src/oneTBB">Thread
        Building Blocks</a> 2018 or newer).
      </li>
      <li> <code>&lt;memory_resource&gt;</code>. </li>
      <li>
        Using the types and functions in <code>&lt;filesystem&gt;</code>
        does not require linking with <code>-lstdc++fs</code> now.
      </li>
      </ul>
  </li>
  <li>Improved experimental support for C++2a,
      including:
      <ul>
      <li>Type traits <code>std::remove_cvref</code>,
        <code>std::unwrap_reference</code>, <code>std::unwrap_decay_ref</code>,
        <code>std::is_nothrow_convertible</code>, and
        <code>std::type_identity</code>.</li>
      <li>Headers <code>&lt;bit&gt;</code> and
        <code>&lt;version&gt;</code>.</li>
      <li>Uniform container erasure (<code>std::erase_if</code>).</li>
      <li><code>contains</code> member of maps and sets.</li>
      <li>String prefix and suffix checking (<code>starts_with</code>,
        <code>ends_with</code>).</li>
      <li>Functions <code>std::midpoint</code> and <code>std::lerp</code> for
        interpolation.</li>
      <li><code>std::bind_front</code>.</li>
      <li><code>std::visit&lt;R&gt;</code>.</li>
      <li><code>std::assume_aligned</code>.</li>
      <li>Uses-allocator construction utilities.</li>
      <li><code>std::pmr::polymorphic_allocator&lt;std::byte&gt;</code>.</li>
      <li>Library support for <code>char8_t</code> type.</li>
      <li>Destroying <code>delete</code>.</li>
      <li><code>std::is_constant_evaluated()</code> function.</li>
      </ul>
  </li>
  <li>Support for opening file streams with wide character paths on Windows</li>
  <li>Incomplete support for the C++17 Filesystem library and the Filesystem
      TS on Windows.</li>
  <li>Incomplete, experimental support for the Networking TS.</li>
</ul>

<h3 id="d">D</h3>
<ul>
  <li>Support for the D programming language has been added to GCC,
    implementing version 2.076 of the language and run-time library.
  </li>
</ul>

<h3 id="fortran">Fortran</h3>
<ul>
  <li>Asynchronous I/O is now fully supported. The program needs to
    be linked against the pthreads library to use it, otherwise the
    I/O is done synchronously.  For systems which do not support
    POSIX condition variables, such as AIX, all I/O is still
    done synchronously.
  </li>
  <li>The <code>BACK</code> argument for <code>MINLOC</code> and
    <code>MAXLOC</code> has been implemented.
  </li>
  <li>The <code>FINDLOC</code> intrinsic function has been
    implemented.
  </li>
  <li>The <code>IS_CONTIGUOUS</code> intrinsic function has been
    implemented.
  </li>
  <li>
    Direct access to the real and imaginary parts of a complex
    variable via <code>c&percnt;re</code>
    and <code>c&percnt;im</code> has been implemented.
  </li>
  <li>
    Type parameter inquiry via <code>str&percnt;len</code>
    and <code>a&percnt;kind</code> has been implemented.
  </li>
  <li>
    C descriptors and the <code>ISO_Fortran_binding.h</code>
    source file have been implemented.
  </li>
  <li>The <code>MAX</code> and <code>MIN</code> intrinsics are no
  longer guaranteed to return any particular value in case one of the
  arguments is a <code>NaN</code>.  Note that this conforms to the
  Fortran standard and to what other Fortran compilers do.  If there
  is a need to handle that case in some specific way, one needs to
  explicitly check for <code>NaN</code>'s before
  calling <code>MAX</code> or <code>MIN</code>, e.g. by using
  the <code>IEEE_IS_NAN</code> function from the intrinsic
  module <code>IEEE_ARITHMETIC</code>.
  </li>
  <li>
      A new command-line option <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/Fortran-Dialect-Options.html#index-fdec-include"><code>-fdec-include</code></a>, set also
    by the <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/Fortran-Dialect-Options.html#index-fdec"><code>-fdec</code></a> option,
    has been added to increase compatibility with legacy code.  With this
    option, an <code>INCLUDE</code> directive is also parsed as a statement,
    which allows the directive to be spread across multiple source lines
    with line continuations.
  </li>
  <li>
      A new <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gfortran/BUILTIN-directive.html#BUILTIN-directive"><code>BUILTIN</code></a> directive, has been added.
    The purpose of the directive is to provide an API between the GCC compiler and
    the GNU C Library which would define vector implementations of math routines.
  </li>
</ul>

<h3 id="go">Go</h3>
<ul>
  <li>GCC 9 provides a complete implementation of the Go 1.12.2
    user packages.</li>
</ul>

<!-- .................................................................. -->
<h2 id="jit">libgccjit</h2>

<ul>
  <li>
    The libgccjit API gained a new entry point:
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/jit/topics/contexts.html#gcc_jit_context_add_driver_option">gcc_jit_context_add_driver_option</a>.
  </li>
</ul>

<!-- .................................................................. -->
<h2 id="targets">New Targets and Target Specific Improvements</h2>

<h3 id="arm-targets">AArch64 &amp; Arm</h3>

<ul>
  <li>
    Support has been added for the following processors
    (GCC identifiers in parentheses):
    <ul>
	<li>Arm Cortex-A76 (<code>cortex-a76</code>).</li>
	<li>Arm Cortex-A55/Cortex-A76 DynamIQ big.LITTLE (<code>cortex-a76.cortex-a55</code>).</li>
	<li>Arm Neoverse N1 (<code>neoverse-n1</code>).</li>
    </ul>
    The GCC identifiers can be used
    as arguments to the <code>-mcpu</code> or <code>-mtune</code> options,
    for example: <code>-mcpu=cortex-a76</code> or
    <code>-mtune=cortex-a76.cortex-a55</code> or as arguments to the equivalent target
    attributes and pragmas.
  </li>
  <li>
    <p>The Armv8.3-A complex number instructions are now supported via intrinsics
    when the option <code>-march=armv8.3-a</code> or equivalent is specified.
    For the half-precision floating-point variants of these instructions use the
    architecture extension flag <code>+fp16</code>, e.g.
    <code>-march=armv8.3-a+fp16</code>.
    </p>
    <p>The intrinsics are defined by the ACLE specification.</p>
  </li>
  <li>
    The Armv8.5-A architecture is now supported through the
    <code>-march=armv8.5-a</code> option.
  </li>
  <li> The Armv8.5-A architecture also adds some security features that are
    optional to all older architecture versions. These are now supported
    and only affect the assembler.
    <ul>
	<li> Speculation Barrier instruction through the
	     <code>-march=armv8-a+sb</code> option.</li>
	<li> Execution and Data Prediction Restriction instructions through
	     the <code>-march=armv8-a+predres</code> option.</li>
	<li> Speculative Store Bypass Safe instruction through the
	     <code>-march=armv8-a+ssbs</code> option. This does not require a
	     compiler option for Arm and thus <code>-march=armv8-a+ssbs</code>
	     is an AArch64-specific option.</li>
    </ul>
  </li>
</ul>

<h5 id="aarch64">AArch64 specific</h5>
<ul>
  <li>
    Support has been added for the Arm Neoverse E1 processor
    (<code>-mcpu=neoverse-e1</code>).
  </li>

  <li>
    The AArch64 port now has support for stack clash protection using the
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Instrumentation-Options.html#index-fstack-protector"><code>-fstack-clash-protection</code></a> option.  The probing interval/guard
    size can be set by using <code>--param stack-clash-protection-guard-size=12|16</code>.
    The value of this parameter must be in bytes represented as a power of two.
    The two supported values for this parameter are 12 (for a 4KiB size, 2^12)
    and 16 (for a 64KiB size, 2^16).

    The default value is 16 (64Kb) and can be changed at configure
    time using the flag <code>--with-stack-clash-protection-guard-size=12|16</code>.
  </li>
  <li>
    The option <code>-msign-return-address=</code> has been deprecated. This
    has been replaced by the new <code>-mbranch-protection=</code> option. This
    new option can now be used to enable the return address signing as well as
    the new Branch Target Identification feature of Armv8.5-A architecture. For
    more information on the arguments accepted by this option, please refer to
     <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/AArch64-Options.html#AArch64-Options">AArch64-Options</a>.
  </li>
  <li> The following optional extensions to Armv8.5-A architecture are
       now supported and only affect the assembler.
    <ul>
	<li> Random Number Generation instructions through the
	     <code>-march=armv8.5-a+rng</code> option.</li>
	<li> Memory Tagging Extension through the
	     <code>-march=armv8.5-a+memtag</code> option.</li>
    </ul>
  </li>
</ul>

<h5 id="arm">Arm specific</h5>
<ul>
  <li>
    Support for the deprecated Armv2 and Armv3 architectures and their
    variants has been removed.  Their corresponding <code>-march</code>
    values and the <code>-mcpu</code> options that used these architectures
    have been removed.
  </li>
  <li>
     Support for the Armv5 and Armv5E architectures
     (which have no known implementations) has been removed.
     Note that Armv5T, Armv5TE and Armv5TEJ architectures remain supported.
  </li>
  <li>
     Corrected FPU configurations for Cortex-R7 and Cortex-R8 when using their
     respective <code>-mcpu</code> options.
  </li>
</ul>

<h3 id="amdgcn">AMD GCN</h3>
<ul>
  <li>
    A new back end targeting AMD GCN GPUs has been contributed to GCC.  The
    implementation is currently limited to compiling single-threaded,
    stand-alone programs.  Future versions will add support for offloading
    multi-threaded kernels via OpenMP and OpenACC.  The following devices are
    supported (GCC identifiers in parentheses):
    <ul>
      <li>Fiji (<code>fiji</code>).</li>
      <li>Vega 10 (<code>gfx900</code>).</li>
    </ul>
  </li>
</ul>

<h3 id="arc">ARC</h3>
<ul>
  <li>LRA is now on by default for the ARC target.  This can be
  controlled by <code>-mlra</code>.</li>
  <li>Add support for frame code-density and branch-and-index
  instructions.</li>
</ul>

<!-- <h3 id="avr">AVR</h3> -->

<h3 id="csky">C-SKY</h3>
<ul>
  <li>
    A new back end targeting C-SKY V2 processors has been contributed to GCC.
  </li>
</ul>

<!-- <h3 id="hsa">Heterogeneous Systems Architecture</h3> -->

<h3 id="x86">IA-32/x86-64</h3>
<ul>
  <li>Support of Intel MPX (Memory Protection Extensions) has been removed.</li>
  <li>New ISA extension support for Intel PTWRITE was added to GCC.  PTWRITE
      intrinsics are available via the <code>-mptwrite</code> compiler switch.
  </li>
  <li>GCC now supports the Intel CPU named Cascade Lake with AVX512 extensions
      through <code>-march=cascadelake</code>. The switch enables the following
      ISA extensions: AVX512F, AVX512VL, AVX512CD, AVX512BW, AVX512DQ, AVX512VNNI.
  </li>
</ul>


<!-- <h3 id="mips">MIPS</h3> -->

<!-- <h3 id="mep">MeP</h3> -->

<!-- <h3 id="msp430">MSP430</h3> -->

<!-- <h3 id="nds32">NDS32</h3> -->

<!-- <h3 id="nios2">Nios II</h3> -->

<!-- <h3 id="nvptx">NVPTX</h3> -->

<h3 id="or1k">OpenRISC</h3>
<ul>
  <li>
    A new back end targeting OpenRISC processors has been contributed to GCC.
  </li>
</ul>

<!-- <h3 id="hppa">PA-RISC</h3> -->

<!-- <h3 id="powerpc">PowerPC / PowerPC64 / RS6000</h3> -->

<h3 id="s390">S/390, System z, IBM z Systems</h3>
<ul>
  <li>Support for the arch13 architecture has been added.  When using
    the <code>-march=arch13</code> option, the compiler will generate
    code making use of the new instructions introduced with the vector
    enhancement facility 2 and the miscellaneous instruction extension
    facility 2.  The <code>-mtune=arch13</code> option enables arch13
    specific instruction scheduling without making use of new
    instructions.</li>

  <li>Builtins for the new vector instructions have been added and can
    be enabled using the <code>-mzvector</code> option.</li>

  <li>Support for ESA architecture machines g5 and g6 is deprecated
    since GCC 6.1.0 and has been removed now.</li>

  <li>When compiling with <code>-march=z14</code> or higher GCC emits
    alignments hints on the vector load/store instructions (8 or 16
    byte).</li>

  <li>Functions now have a default alignment of 16 bytes.  This helps
    with branch prediction effects.</li>

  <li><code>-mfentry</code> is now supported.  As well
    as the mcount mechanism the <code>__fentry__</code> is called
    before the function prologue.
    However, since just a single instruction is required to call
    <code>__fentry__</code> the call sequence imposes a smaller
    overhead than mcount (4 instructions).

    The produced code is compatible only with newer glibc versions,
    which provide the <code>__fentry__</code> symbol and do not
    clobber r0 when resolving lazily bound functions.

    <code>-mfentry</code> is only supported when generating 64 bit
    code and does not work with nested C functions.</li>

  <li>The <code>-mnop-mcount</code> option can be used to emit NOP
    instructions instead of an mcount or fentry call stub.</li>

  <li>With the <code>-mrecord-mcount</code> option
    a <code>__mcount_loc</code> section is generated containing
    pointers to each profiling call stub.  This is useful for
    automatically patching in and out calls.</li>
</ul>

<!-- <h3 id="riscv">RISC-V</h3> -->

<!-- <h3 id="rx">RX</h3> -->

<!-- <h3 id="sh">SH</h3> -->

<!-- <h3 id="sparc">SPARC</h3> -->

<!-- <h3 id="Tile">Tile</h3> -->

<!-- .................................................................. -->
<h2 id="os">Operating Systems</h2>

<!-- <h3 id="aix">AIX</h3> -->

<!-- <h3 id="fuchsia">Fuchsia</h3> -->

<!-- <h3 id="dragonfly">DragonFly BSD</h3> -->

<!-- <h3 id="freebsd">FreeBSD</h3> -->

<!-- <h3 id="gnulinux">GNU/Linux</h3> -->

<!-- <h3 id="rtems">RTEMS</h3> -->

<h3 id="solaris">Solaris</h3>

<ul>
  <li> <code>g++</code> now unconditionally enables large file support when
    compiling 32-bit code.
  <li> Support for the AddressSanitizer and UndefinedBehaviorSanitizer has
    been merged from LLVM.  For the moment, this only works for 32-bit code
    on both SPARC and x86.
  <li> An initial port of the D runtime library has been completed on
    Solaris 11/x86.  It requires the use of GNU as.  Solaris 11/SPARC support
    is still work-in-progress.
</ul>

<!-- <h3 id="vxmils">VxWorks MILS</h3> -->

<h3 id="windows">Windows</h3>

<ul>
  <li>A C++ Microsoft ABI bitfield layout
  bug, <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87137">PR87137</a>
  has been fixed.  A non-field declaration could cause the current
  bitfield allocation unit to be completed, incorrectly placing a
  following bitfield into a new allocation unit.  The Microsoft ABI is
  selected for:
  <ul>
    <li>Mingw targets
    <li>PowerPC, IA-32 or x86-64 targets
      when the <code>-mms-bitfields</code> option is specified,
      or <code>__attribute__((ms_struct))</code> is used
    <li>SuperH targets when the <code>-mhitachi</code> option is
      specified, or <code>__attribute__((renesas))</code> is used
  </ul>
</ul>

<!-- .................................................................. -->
<!-- <h2>Documentation improvements</h2> -->


<!-- .................................................................. -->
<h2 id="plugins">Improvements for plugin authors</h2>
<ul>
  <li>
    GCC's diagnostic subsystem now has a way to logically group together
    related diagnostics, <code>auto_diagnostic_group</code>.  Such
    diagnostics will be nested by the output of
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format">-fdiagnostics-format=json</a>.
  </li>

  <li>
    GCC now has a set of
    <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gccint/User-Experience-Guidelines.html">user experience guidelines for GCC</a>,
    with information and advice on implementing new diagnostics.
  </li>
</ul>

<!-- .................................................................. -->
<h2>Other significant improvements</h2>
<ul>
  <li>
     GCC's internal "selftest" suite now runs for C++ as well as C (in
     debug builds of the compiler).
  </li>
</ul>

<!-- .................................................................. -->
<h2 id="GCC9.1">GCC 9.1</h2>

<p>This is the <a href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=9.0">list
of problem reports (PRs)</a> from GCC's bug tracking system that are
known to be fixed in the 9.1 release. This list might not be
complete (that is, it is possible that some PRs that have been fixed
are not listed here).</p>

<!-- .................................................................. -->
<h2 id="GCC9.2">GCC 9.2</h2>

<p>This is the <a href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=9.2">list
of problem reports (PRs)</a> from GCC's bug tracking system that are
known to be fixed in the 9.2 release. This list might not be
complete (that is, it is possible that some PRs that have been fixed
are not listed here).</p>

<!-- .................................................................. -->
<h2 id="GCC9.3">GCC 9.3</h2>

<p>This is the <a href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=9.3">list
of problem reports (PRs)</a> from GCC's bug tracking system that are
known to be fixed in the 9.3 release. This list might not be
complete (that is, it is possible that some PRs that have been fixed
are not listed here).</p>

<!-- .................................................................. -->
<h2 id="GCC9.4">GCC 9.4</h2>

<p>This is the <a href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=9.4">list
of problem reports (PRs)</a> from GCC's bug tracking system that are
known to be fixed in the 9.4 release. This list might not be
complete (that is, it is possible that some PRs that have been fixed
are not listed here).</p>

<h3> Target Specific Changes</h3>

<h4>AArch64</h4>
  <ul>
    <li>
  The option <code>-moutline-atomics</code> has been added to aid
  deployment of the Large System Extensions (LSE) on GNU/Linux systems built
  with a baseline architecture targeting Armv8-A.  When the option is
  specified code is emitted to detect the presence of LSE instructions at
  run time and use them for standard atomic operations.
  For more information please refer to the documentation.
    </li>
    <li>GCC now supports the Fujitsu A64FX.  The associated <code>-mcpu</code>
    and <code>-mtune</code> options are <code>-mcpu=a64fx</code> and
    <code>-mtune=a64fx</code> respectively.  In particular,
    <code>-mcpu=a64fx</code> generates code for Armv8.2-A with SVE and
    tunes the code for the A64FX.  This includes tuning the SVE code,
    although by default the code is still length-agnostic and so works for
    all SVE implementations.  Adding <code>-msve-vector-bits=512</code>
    makes the code specific to 512-bit SVE.</li>
  </ul>

<!-- .................................................................. -->
<h2 id="GCC9.5">GCC 9.5</h2>

<p>This is the <a href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=9.5">list
of problem reports (PRs)</a> from GCC's bug tracking system that are
known to be fixed in the 9.5 release. This list might not be
complete (that is, it is possible that some PRs that have been fixed
are not listed here).</p>

</body>
</html>
